<!DOCTYPE html>
<html
        lang="en"
        xmlns:th="http://www.thymeleaf.org"
>

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .position-item {
            width: 200px;
            height: 122px;
            margin: 10px;
            padding: 5px;
            border: cornflowerblue 1px solid;
            float: left;
            list-style: none;
        }

        body {
            background: rgba(39, 95, 39, 0.5);
        }

        .searchBox {
            display: flex;
            align-items: center;
        }

        input {
            outline: none;
            border: none;
            width: 220px;
            margin-right: 20px;
            background: rgb(62, 54, 131);
            color: #ffffff;
            border-radius: 4px;
            line-height: 32px;
            height: 32px;
        }

        ::-webkit-input-placeholder {
            /* WebKit browsers */
            color: #fff;
            font-size: 12px;
            text-indent: 4px;
        }


        button {
            width: 80px;
            height: 36px;
            outline: none;
            border: none;
            line-height: 36px;
            color: #ffffff;
            background: rgb(54, 131, 54);
            border-radius: 4px;
        }

        .content {
            background: rgba(39, 95, 39, 0.7);
            height: 100%;
            width: 100%;
            border-radius: 4px;
            padding: 4px 12px;
            box-sizing: border-box;
            margin-top: 8px;
        ;
        }

        h2 {
            color: #ffffff;
        }

        ul {
            height: calc(100vh - 180px);
        }

        .position-item {
            border: rgba(36, 82, 36, .8) 2px solid;
            border-radius: 4px;
            color: #ffffff;
            height: 220px;
            line-height: 30px;
            width: 220px;
            font-size: 14px;
            border-radius: 4px;
        }
    </style>
</head>

<body>
<form
        class="searchBox"
        action="/query"
>
    <input
            placeholder="请输入搜索关键字"
            name="positionName"
    >
    <button type="submit">搜索</button>
</form>
<div class="content">
    <h2>搜索结果</h2>
    <ul>
        <li
                th:each="item : ${list}"
                class="position-item"
        >
            <div>
                职位名称: <span th:text="${item.positionName}"></span>

            </div>
            <div>
                薪资范围: <span th:text="${item.salary}"></span>
            </div>
            <div>
                工作经验要求: <span th:text="${item.workYear}"></span>
            </div>
            <div>
                学历要求: <span th:text="${item.education}"></span>

            </div>
            <div>
                描述: <span th:text="${item.positionAdvantage}"></span>
            </div>
            <div>
                公司名称: <span th:text="${item.companyName}"></span>
            </div>
            <div>
                城市:<span th:text="${item.workAddress}">城市</span>
            </div>
        </li>
    </ul>
</div>
</body>

</html>